.container-fluid
  .row
    .col-sm-2
      = render 'admin/sidebar'
      = render 'sidebar'
    .col-sm-10
      .my-panel
        %h2
          Users
          %span.badge= @users.count
        %table.table.table-hover
          %thead
            %tr
              %th Id
              %th Email
              %th Name
              %th CreatedAt
              %th Roles
              %th &nbsp;
          %tbody
            - @users.each do |user|
              %tr
                %td= user.id
                %td= user.email
                %td= user.name
                %td= user.created_at.to_formatted_s(:long)
                %td= YAML::load(user.roles).join(':')
                %td
                  .btn-group
                    = link_to glyphicon_span('eye-open'), admin_user_path(user), remote: true, class: 'btn btn-xs btn-default'
                    = link_to glyphicon_span('edit'), edit_admin_user_path(user), remote: true, class: 'btn btn-xs btn-default'
                    = link_to glyphicon_span('remove'), admin_user_path(user), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-xs btn-default'
.modal.fade#viewUser{:tabindex => '-1', :role => 'dialog', :'aria-labelledby' => 'viewUserLabel', :'aria-hidden' => 'true'}
.modal.fade#editUser{:tabindex => '-1', :role => 'dialog', :'aria-labelledby' => 'editUserLabel', :'aria-hidden' => 'true'}
.modal.fade#newUser{:tabindex => '-1', :role => 'dialog', :'aria-labelledby' => 'newUserLabel', :'aria-hidden' => 'true'}
